package com.ruoyi.common.vo;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import com.ruoyi.common.core.domain.R;
import io.swagger.v3.oas.annotations.media.Schema;

@Schema(
        description = "接口返回的对象"
)
public class MixinsResp<T> extends R<T> {
    @JsonTypeInfo(
            use = Id.CLASS,
            include = As.PROPERTY,
            property = "className"
    )
    @Schema(
            description = "返回的数据"
    )
    private T data;

    public T getData() {
        return this.data;
    }

    @JsonTypeInfo(
            use = Id.CLASS,
            include = As.PROPERTY,
            property = "className"
    )
    public MixinsResp<T> setData(T data) {
        this.data = data;
        return this;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof MixinsResp)) {
            return false;
        } else {
            MixinsResp<?> other = (MixinsResp)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$data = this.getData();
                Object other$data = other.getData();
                if (this$data == null) {
                    if (other$data != null) {
                        return false;
                    }
                } else if (!this$data.equals(other$data)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof MixinsResp;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $data = this.getData();
        result = result * 59 + ($data == null ? 43 : $data.hashCode());
        return result;
    }

    public String toString() {
        return "MixinsResp(data=" + this.getData() + ")";
    }

    public MixinsResp() {
    }
}
